how to read a file in python

222

python read file line by line -

with open("file.txt") as file_in:
    lines = []
    for line in file_in:
        lines.append(line)

Comments

Submit
0 Comments